//
//  ViewController.swift
//  XBasicKit
//
//  Created by anru on 08/04/2024.
//  Copyright (c) 2024 anru. All rights reserved.
//

import UIKit
import XBasicKit
import XDesignKit
import RxSwift
import RxCocoa

class VController: UIViewController {

    lazy var segmentedControl: SegmentedControl = {
        let view = SegmentedControl(items: ["A", "B", "C"])
        view.selectedSegmentIndex = 0
        view.y = 200
        view.snp.makeConstraints({ (make) in
            make.width.equalTo(250)
        })
        return view
    }()
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        let v =  UIView()
        v.makeRoundedCorners()
        
         /*Button().rx.backgroundImage(for: .normal)*/
//        view.rx.backgroundColor.bind()
        view.theme.backgroundColor = themeService.attribute{ $0.background }
//        view.rx.tap().map{_ in Optional(1)}.filterNil()
        print(Dimensions.segmentedControlHeight)
        view.addSubview(segmentedControl)
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}

